import request from '@/utils/request'

// 获取-员工列表
export const getEmployeeList = params => request.get('/sys/user', { params })

// 批量-导出员工excel
export const getExcelList = () => request.get('/sys/user/export', { responseType: 'blob' })

// 批量-导出员工excel
export const getDowExcel = () => request.get('/sys/user/import/template', { responseType: 'blob' })

// 批量-导入员工(上传excel)
export const upDataExcel = data => request.post('/sys/user/import', data)

// 删除员工
export const delUserExcel = id => request.delete(`/sys/user/${id}`)

// 添加员工
export const addUserExcel = data => request.post(`/sys/user`, data)

// 获取-用户基本资料
export const getEmployeeDetail = id => request.get(`/sys/user/${id}`)

// 修改-员工-基本信息
export const putEmployeeDetail = data => request.put(`/sys/user/${data.id}`, data)